package persistence;

public class ServerData {

	FileHandler fileHandler = new FileHandler();
	private String freigabe;
	private String satzstatus;
	private int gegnerzug;
	private String sieger;
	
	public void readServerData(String fileName){
		
		try {
			freigabe = fileHandler.readXML(fileName, "freigabe");
			satzstatus = fileHandler.readXML(fileName, "satzstatus");
			gegnerzug = Integer.valueOf(fileHandler.readXML(fileName, "gegnerzug"));
			sieger = fileHandler.readXML(fileName, "sieger");
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		
	}
	
	public String getFreigabe(){
		return freigabe;
	}
	
	public String getSatzstatus(){
		return satzstatus;
	}
	
	public int getGegnerzug(){
		return gegnerzug;
	}
	
	public String getSieger(){
		return sieger;
	}
}
